﻿#region Using Statements
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using starLiGHT.Collections;
using starLiGHT.Physic.TwoD;

#endregion

namespace starLiGHT.Sandbox.PhysicCollisionCallback
{
    public class CollisionHandler : ContactListener
    {
        List<Contact> contacts = new List<Contact>();

        public override void BeginContact(Contact contact)
        {
            contacts.Add(contact);
        }

        public override void EndContact(Contact contact)
        {
            contacts.Remove(contact);
        }

        public override void PreSolve(Contact contact, Manifold oldManifold)
        {
            base.PreSolve(contact, oldManifold);
        }

        public override void PostSolve(Contact contact, ContactImpulse impulse)
        {
            base.PostSolve(contact, impulse);
        }
    }
}
